/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "folha_historico_salarial")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FolhaHistoricoSalarial.findAll", query = "SELECT f FROM FolhaHistoricoSalarial f")})
public class FolhaHistoricoSalarial implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 7)
    private String competencia;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "SALARIO_ATUAL", precision = 18, scale = 6)
    private BigDecimal salarioAtual;
    @Column(name = "PERCENTUAL_AUMENTO", precision = 18, scale = 6)
    private BigDecimal percentualAumento;
    @Column(name = "SALARIO_NOVO", precision = 18, scale = 6)
    private BigDecimal salarioNovo;
    @Column(name = "VALIDO_A_PARTIR", length = 7)
    private String validoAPartir;
    @Column(length = 100)
    private String motivo;
    @JoinColumn(name = "ID_COLABORADOR", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private Colaborador idColaborador;

    public FolhaHistoricoSalarial() {
    }

    public FolhaHistoricoSalarial(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCompetencia() {
        return competencia;
    }

    public void setCompetencia(String competencia) {
        this.competencia = competencia;
    }

    public BigDecimal getSalarioAtual() {
        return salarioAtual;
    }

    public void setSalarioAtual(BigDecimal salarioAtual) {
        this.salarioAtual = salarioAtual;
    }

    public BigDecimal getPercentualAumento() {
        return percentualAumento;
    }

    public void setPercentualAumento(BigDecimal percentualAumento) {
        this.percentualAumento = percentualAumento;
    }

    public BigDecimal getSalarioNovo() {
        return salarioNovo;
    }

    public void setSalarioNovo(BigDecimal salarioNovo) {
        this.salarioNovo = salarioNovo;
    }

    public String getValidoAPartir() {
        return validoAPartir;
    }

    public void setValidoAPartir(String validoAPartir) {
        this.validoAPartir = validoAPartir;
    }

    public String getMotivo() {
        return motivo;
    }

    public void setMotivo(String motivo) {
        this.motivo = motivo;
    }

    public Colaborador getIdColaborador() {
        return idColaborador;
    }

    public void setIdColaborador(Colaborador idColaborador) {
        this.idColaborador = idColaborador;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FolhaHistoricoSalarial)) {
            return false;
        }
        FolhaHistoricoSalarial other = (FolhaHistoricoSalarial) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FolhaHistoricoSalarial[ id=" + id + " ]";
    }
    
}
